This script analyses the data set data_pleiotropy.csv. This data sets contains the results of an experiment testing the effects of temperature and pH stress on spore germination of cooperation-defective mutants of Myxococcus xanthus, and the effects of these stresses on the mutants’ abilities to cheat on their cooperation-proficient ancestor. To test for cheating, we use the relative fitness measure Wij.

1: import the data

We import the data and plot spore production. We have dilution plate counts of CFUs for each pure culture, and for each mix with have a total count and a count of one of the partners. We first have to calculate spore production based on the dilution factors, and then calculate the spore production of the partnered strain in mixes by subtraction.

For CFU counts of zero, we estimate the maximum undetectable number of CFUs (0.9) before calculating total spore production.

## 'data.frame':    334 obs. of  10 variables:
##  $ replicate  : int  4 4 4 4 4 4 4 4 4 4 ...
##  $ plate      : chr  "GJV1" "GJV1" "GJV1" "GJV1" ...
##  $ antibiotic : chr  "none" "none" "none" "none" ...
##  $ defector   : chr  "none" "none" "none" "none" ...
##  $ cooperator : chr  "GJV1" "GJV1" "GJV1" "GJV1" ...
##  $ type       : chr  "control" "control" "control" "control" ...
##  $ environment: chr  "temperature" "temperature" "temperature" "pH" ...
##  $ treatment  : num  50 55 58 5.1 6.8 8.7 50 50 55 55 ...
##  $ dilution   : num  5 4 2 5 5 3 4 4 3 2 ...
##  $ cfus       : int  48 77 270 65 69 2664 109 98 260 252 ...
## 'data.frame':    164 obs. of  12 variables:
##  $ replicate  : int  4 4 4 4 4 4 4 4 4 4 ...
##  $ plate      : chr  "GJV2" "GJV2" "GJV2" "GJV2" ...
##  $ antibiotic : chr  "none" "none" "none" "none" ...
##  $ defector   : Factor w/ 4 levels "DK4324","DK5208",..: 4 4 4 4 4 4 1 2 1 1 ...
##  $ cooperator : Factor w/ 3 levels "GJV1","GJV2",..: 2 2 2 2 2 2 3 3 2 2 ...
##  $ type       : Factor w/ 4 levels "control","cooperatorspores",..: 1 1 1 1 1 1 1 1 4 3 ...
##  $ environment: Factor w/ 2 levels "pH","temperature": 2 2 2 1 1 1 2 2 2 2 ...
##  $ treatment  : num  50 55 58 5.1 6.8 8.7 50 50 50 50 ...
##  $ dilution   : num  4 3 2 3 4 3 1 0.5 3 3 ...
##  $ cfus       : int  109 260 40 1296 228 66 0 4 272 80 ...
##  $ numspores  : num  1090000 260000 4000 1296000 2280000 ...
##  $ logspores  : num  6.04 5.41 3.6 6.11 6.36 ...

2: pure culture spore production under standard conditions

For the graph of each strain’s spore count in pure culture, we used only the counts from non-selective plates (i.e. no antibiotics).

We test for statistically significant differences among pure culture spore production values.

##             Df Sum Sq Mean Sq F value Pr(>F)    
## plate        2 101.86   50.93   38.64  2e-06 ***
## Residuals   14  18.45    1.32                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Yes, the general linear model tells us that the strain identity matters for the spore count.

##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = logspores ~ plate, data = data[which(data$treatment == "50" & data$type == "control"), ])
## 
## $plate
##                    diff       lwr        upr     p adj
## DK4324-GJV2   -3.671972 -5.491417 -1.8525275 0.0003198
## DK5208-GJV2   -5.763476 -7.498248 -4.0287037 0.0000015
## DK5208-DK4324 -2.091504 -3.910949 -0.2720594 0.0239156

The contrast table shows us that they are all different from each other.

Now we make a nice graph which shows the differences.

N = 5 to 6 *** means p < 0.005 in Tukey tests with that strain. ** means p < 0.01 in Tukey tests with that strain.

3: stress effects and spore production in mixture

Now we have an introductory overview of what the spore production data look like. Next, we calculate the individual spore production numbers for each partner in the mixes and under stressful conditions.

We look at spore production of the cooperator and the mixes in the non-standard treatments to see if they were actually stressful, ie resulted in lower spore survival.

3.1: statistics on stress effect of non-standard treatments

We run a GLM.

##                          Df Sum Sq Mean Sq F value   Pr(>F)    
## treatment                 5 291.77   58.35  83.475  < 2e-16 ***
## type                      2  18.65    9.32  13.337 5.73e-06 ***
## defector                  1  81.99   81.99 117.286  < 2e-16 ***
## treatment:type           10   7.17    0.72   1.026    0.426    
## treatment:defector        5  33.59    6.72   9.611 9.20e-08 ***
## type:defector             1  33.80   33.80  48.350 1.85e-10 ***
## treatment:type:defector   5   3.68    0.74   1.052    0.390    
## Residuals               123  85.98    0.70                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

There are significant interactions in the model.

We do a t-test for each strain/competitor for difference from the control, asking the question “are the non-standard conditions stressful, ie do they result in lower spore survival?”

## [1] "GJV2 pure culture: acid, basic, 55, 58. GJV2 mix DK4324: acid, basic, 55, 58. GJV2 mix DK5208: acid, basic, 55, 58. DK4324 mix: acid, basic, 55, 58. DK5208 mix: acid, basic, 55, 58"
##  [1] 0.0542 0.0027 0.0015 0.0061 0.1654 0.0107 0.0020 0.0033 0.0257 0.0015
## [11] 0.0015 0.0019 0.1391 0.0015 0.0015 0.0012 0.3621 0.0061 0.0015 0.0031

Most conditions are stressful. GJV2 mixed with DK4324 under pH 5.1 is not (p = 0.1654), nor is DK4324 in mixture under pH 5.1 (p = 0.1391), or DK5208 in mixture under pH 5.1 (p = 0.3621). GJV2 in pure culture under pH 5.1 is close to significance, p = 0.0542.

4: stress tolerance

Calculate stress tolerances and cheating abilities for each defector strain under temperature stress and pH stress.

stress tolerance = spores of strain X under stressful condition / spores of strain X under control condition

The control condition for temperature stress is 50 deg C, and for pH stress is 6.8.

We remove instances where total spore count and selective spore count for a mixture were both zero, because the estimate of the metric is in that case not biologically useful due to uncertainty about the actual spore counts of both parties.

For temperature stress, N = 3 to 6 For pH stress, N = 3 to 5

4.1: statistics on stress tolerance

We check for pleiotropy, which in this case is shown by the defector having a different stress tolerance than the cooperator in mixture. The cooperator may also be affected by mixing and have a different stress tolerance than in pure culture.

4.1.1: temperature

##                  Df Sum Sq Mean Sq F value   Pr(>F)    
## strain            3   9.93    3.31   4.296  0.00963 ** 
## treatment         1  60.22   60.22  78.165 2.59e-11 ***
## strain:treatment  3   3.16    1.05   1.367  0.26522    
## Residuals        44  33.90    0.77                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

For temperature, strain and treatment both significantly influence variation within the data, although this seems to be driven by GJV2.

Following this, we have two questions: is cheater stress tolerance different from cooperator stress tolerance? and is cooperator stress tolerance in mixture different from cooperator stress tolerance in pure culture? For the first, we do t-tests with Bonferroni-Holm correction. For the second, we do Dunnett tests.

Is cheater stress tolerance different from cooperator stress tolerance, under temperature stress?

## [1] "DK4324 55" "DK5208 55" "DK4324 58" "DK5208 58"
## [1] 0.0070 0.5607 0.7645 0.5607

We find evidence for pleiotropy of stress tolerance and the cheater defect in strain DK4324 at 55 degrees.

Is cooperator stress tolerance different in mixture vs in pure culture?

## [1] "55"
## 
##   Dunnett's test for comparing several treatments with a control :  
##     95% family-wise confidence level
## 
## $GJV2
##                         diff     lwr.ci    upr.ci   pval    
## GJV2:DK4324-GJV2 -0.17409816 -0.5894387 0.2412424 0.5021    
## GJV2:DK5208-GJV2  0.02427228 -0.3717394 0.4202840 0.9837    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## [1] "58"
## 
##   Dunnett's test for comparing several treatments with a control :  
##     95% family-wise confidence level
## 
## $GJV2
##                        diff    lwr.ci   upr.ci   pval    
## GJV2:DK4324-GJV2 -0.7896101 -3.045694 1.466474 0.6066    
## GJV2:DK5208-GJV2 -0.7807395 -2.622825 1.061346 0.4912    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

We find no evidence for differences between pure-culture and mixed-culture stress tolerances of GVJ2 when mixed with either of the cheaters under temperature stress. We therefore do not correct for multiple testing of the two Dunnett tests across the two temperature treatments.

4.1.2: pH

##                  Df Sum Sq Mean Sq F value   Pr(>F)    
## strain            3  10.30    3.43   10.06 5.92e-05 ***
## treatment         1  37.28   37.28  109.19 1.89e-12 ***
## strain:treatment  3  11.10    3.70   10.84 3.22e-05 ***
## Residuals        36  12.29    0.34                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

For pH, the interactions are all significant, which means that we need individual models for each treatment level.

## [1] "5.1"

##             Df Sum Sq Mean Sq F value Pr(>F)
## strain       3 0.2879 0.09596   0.837   0.49
## Residuals   19 2.1776 0.11461
## [1] "8.7"

##             Df Sum Sq Mean Sq F value   Pr(>F)    
## strain       3  22.96   7.654   12.87 0.000124 ***
## Residuals   17  10.11   0.595                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

There are differences at pH 8.7, but not at 5.1. So we continue analyzing the pH 8.7 data for specific differences.

Following this, we have two questions: is cheater stress tolerance different from cooperator stress tolerance? and is cooperator stress tolerance in mixture different from cooperator stress tolerance in pure culture? For the first, we do t-tests. For the second, we do Dunnett tests. We use Bonferroni-Holm correction.

Is cheater stress tolerance different from cooperator stress tolerance, under temperature stress?

We include t-tests for pH 5.1 here so that they are accounted for in the correction.

## [1] "DK4324 5.1, DK5208 5.1, DK4324 8.7, DK5208 8.7"
## [1] 0.5920 0.1053 0.1053 0.0283

We find evidence for pleiotropy of stress tolerance and the cheater defect in strain DK5208 at pH 8.7.

Is cooperator stress tolerance different in mixture vs in pure culture?

## [1] "8.7"
## 
##   Dunnett's test for comparing several treatments with a control :  
##     95% family-wise confidence level
## 
## $GJV2
##                        diff     lwr.ci     upr.ci   pval    
## GJV2:DK4324-GJV2 -1.4168038 -2.5278041 -0.3058035 0.0151 *  
## GJV2:DK5208-GJV2  0.2633266 -0.6988279  1.2254811 0.7182    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

We find evidence for social pleiotropy of GJV2 when mixed with DK4324 at pH 8.7. That is, the stress tolerance of the cooperator is altered in mixed culture relative to pure culture.

4.1.3: differences between cheaters

Did the two cheaters produce different numbers of spores than each other under the different stress treatments? Tests are unpaired because the cheaters are not always present in the same replicates and have different numbers of replicates.

## [1] "5.1, 8.7, 55, 58"
## [1] 0.3003 0.0070 0.0070 0.3003
4.1.4: difference in variances between treatments

We noticed that treatments that seemed more stressful, ie 58 deg C and pH 8.7, produced greater variation in the observed responses. Here we test this.

## [1] "pH, temperature"
## [1] 0.1693 0.0461

5: cheating

Cheating ability is represented by the relative fitness measure Wij:

Wij = log10(number spores of cheater in mixture/number spores of partner in mixture) - log10(number initial cells of cheater in mixture/number initial cells of partner in mixture).

From methods: defector was initially present as 10% of a 100 ul aliquot of a cell mixture at a concentration of 5 x 10^9 cells/ml, and cooperator was initially present as the remaining 90%, so in this case,

Wij = log10(number spores of cheater in mixture/number spores of partner in mixture) - log10(0.1).

## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.

N = 4 to 6

5.1: statistics on cheating

5.1.1: are they cheating?

Iterated t-tests for difference from zero, with Bonferroni-Holm correction. For standard conditions, we expected them to cheat, so we do one-tailed tests. We didn’t have an a priori expectation for the effect of stress, so we do two-tailed tests.

## [1] "DK4324: 5.1, 6.8, 8.7, 50, 55, 58. DK5208: 5.1, 6.8, 8.7, 50, 55, 58."
##  [1] 0.1109 0.0258 0.0609 0.0609 0.0004 0.9926 0.0007 0.0004 0.0010 0.0004
## [11] 0.0010 0.0219

For standard conditions, we use one-tailed t-tests because we expect Wij to be greater than zero.

5.1.2: effects of stress

We run a GLM to check for treatment-based and defector-based differences in Wij within each environment. We test pH and temperature separately.

pH:

##                    Df Sum Sq Mean Sq F value   Pr(>F)    
## defector            1 28.240  28.240 238.126 1.43e-12 ***
## treatment           2  0.208   0.104   0.878    0.431    
## defector:treatment  2  4.099   2.050  17.283 4.38e-05 ***
## Residuals          20  2.372   0.119                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

There is an interaction between defector and treatment; the pH treatments affected the two defectors differently.

temperature:

##                    Df Sum Sq Mean Sq F value   Pr(>F)    
## defector            1  36.26   36.26  47.486 3.19e-07 ***
## treatment           2   5.47    2.74   3.582   0.0429 *  
## defector:treatment  2   3.44    1.72   2.252   0.1262    
## Residuals          25  19.09    0.76                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

DK5208 is different from DK4324, particularly at 55 deg C. We proceed with testing them separately.

5.1.1: DK4324

##             Df Sum Sq Mean Sq F value   Pr(>F)    
## treatment    2 3.1607  1.5803   21.58 0.000598 ***
## Residuals    8 0.5859  0.0732                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = wij ~ treatment, data = cheatdata[which(cheatdata$environment == "pH" & cheatdata$defector == "DK4324"), ])
## 
## $treatment
##                diff        lwr        upr     p adj
## 6.8-5.1 -0.05577364 -0.6025738  0.4910265 0.9545146
## 8.7-5.1 -1.23029698 -1.8209086 -0.6396854 0.0008754
## 8.7-6.8 -1.17452335 -1.7651350 -0.5839117 0.0011866

pH 8.7 significantly reduces relative fitness in DK4324 (compared to both 6.8 and 5.1), preventing it from potentially cheating.

##             Df Sum Sq Mean Sq F value Pr(>F)  
## treatment    2  7.850   3.925    5.51 0.0244 *
## Residuals   10  7.124   0.712                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = wij ~ treatment, data = cheatdata[which(cheatdata$environment == "temperature" & cheatdata$defector == "DK4324"), ])
## 
## $treatment
##             diff        lwr        upr     p adj
## 55-50 -1.7168705 -3.1801681 -0.2535728 0.0229269
## 58-50 -0.4021496 -2.0918202  1.2875210 0.7952343
## 58-55  1.3147209 -0.3749497  3.0043915 0.1325654

55 deg C also reduces relative fitness of DK4324, preventing it from potentially cheating. Interestingly, 58 deg C does not, suggesting that the large variance in Wij caused by the impact of temperature stress on the cooperator makes the relative outcome for each on in mixture unpredictable.

5.1.2: DK5208

##             Df Sum Sq Mean Sq F value Pr(>F)  
## treatment    2  1.147  0.5734   3.853  0.051 .
## Residuals   12  1.786  0.1488                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = wij ~ treatment, data = cheatdata[which(cheatdata$environment == "pH" & cheatdata$defector == "DK5208"), ])
## 
## $treatment
##               diff         lwr       upr     p adj
## 6.8-5.1 -0.2221255 -0.87306288 0.4288119 0.6443086
## 8.7-5.1  0.4430334 -0.20790399 1.0939708 0.2060854
## 8.7-6.8  0.6651589  0.01422151 1.3160963 0.0451205

pH 8.7 significantly increases relative fitness in DK5208, enhancing its cheating advantage over the cooperator - synergistic pleiotropy.

##             Df Sum Sq Mean Sq F value Pr(>F)
## treatment    2   1.06  0.5302   0.665  0.529
## Residuals   15  11.97  0.7979

Increased heat has no significant impact on Wij of DK5208.

5.2: decorate graph with significance

## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.

Output figures